﻿using System;
using System.Text.RegularExpressions;

class Program
{
    static void Main()
    {
        string text = "A lass is picking, berries.";
        var matches = Regex.Matches(text, @"\w+|,");
        object[] array = new object[matches.Count];
        matches.CopyTo(array, 0);
        int index = array.Length;
        Console.WriteLine(Regex.Replace(text, @"\w+|,", new MatchEvaluator(
            (x) => 
            {
                index--; 
                return array[index].ToString(); 
            })));
    }
}
